package com.qiujie.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qiujie.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface RoleMapper extends BaseMapper<Role> {

    @Select("SELECT r.* FROM per_role r " +
            "JOIN per_staff_role sr ON r.id = sr.role_id " +
            "WHERE sr.staff_id = #{staffId}")
    List<Role> selectByStaffId(Integer staffId);


}
